package com.ruoyi.system.mysql.service;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.system.api.domain.SysOperLog;
import com.ruoyi.system.api.model.LoginUser;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 用户服务
 * 
 * @author ruoyi
 */
@LocalTCC
@FeignClient(contextId = "RemoteMysqlTCCService", value = ServiceNameConstants.SYSTEM_SERVICE_MYSQL1)
public interface RemoteMysqlTCCService
{

    @PostMapping("/operlog/noPermissionList2")
    public R<LoginUser> getUserInfo(@RequestBody SysOperLog sysOperLog);


//    @LocalTCC
    @PostMapping("/operlog/noPermissionList2tcc")
//    @TwoPhaseBusinessAction(name = "deductInventory", commitMethod = "commit", rollbackMethod = "rollback")
    TableDataInfo getUserInfotcc(@RequestBody SysOperLog sysOperLog);

}
